<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .transition-box {
      width: 100px;
      height: 100px;
      background-color: blue;
    }
    .transition-box:hover {
      transition: all 2s;
      background-color: red;
    }
    @keyframes bounce {
      0%, 100% {
        transform: translateX(0);
      }
      50% {
        transform: translateX(100px);
      }
    }
    .animation-box {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background-color: blue;
      animation: bounce 5s ease-in-out infinite;
    }
  </style>
</head>
<body>
  <div>
    <p>过渡</p>
    <div class="transition-box"></div>
  </div>
  <div>
    <p>这是一个跳动的小球</p>
    <div class="animation-box"></div>
  </div>
</body>
</html>